package com.lorizz.modeler.impl;

import org.springframework.beans.factory.annotation.Required;

import com.lorizz.modeler.Generator;
import com.lorizz.modeler.ModelAcceptor;
import com.lorizz.modeler.ModelVisitor;

public class GeneratorImpl implements Generator {

	private ModelVisitor visitor;
	private ModelAcceptor acceptor;
	
	@Required
	public void setVisitor(ModelVisitor visitor) {
		this.visitor = visitor;
	}
	
	@Required
	public void setAcceptor(ModelAcceptor acceptor) {
		this.acceptor = acceptor;
	}

	@Override
	public void generate() {
		acceptor.accept(visitor);
	}

}
